from paho.mqtt import client as mq_client

import json
broker = '120.76.201.116'
port = 1883
import time
def publish(topic,data):
    client=mq_client.Client(f'open-{time.time()}')
    client.connect(broker,port)
    client.publish(topic=topic,payload=data)
    client.disconnect()
    return {'code':0,"msg":"已经发送CMD"}